home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Prof Draw 3.0 disk 1.adf / install_pdraw < prev    next >
Text File  |  1992-07-10  |  12KB  |  380 lines

  1. ;**************************************************
  2. ;  Script to Install Professional Draw 3.0
  3. ;
  4. ;  This installer utility program assumes that the
  5. ;  AmigaDos command "CD" is in the shells search path.
  6. ;
  7. ;  This program will generate a script customized
  8. ;  to the users particular system by asking a set of
  9. ;  questions.  It writes this script to the file:
  10. ;  "ram:install_script" then executes it.
  11. ;
  12. ;  It then copies the Clip Art to the system.
  13. ;
  14. ;  Copyright ©1992 QUARTEX!! Inc.
  15. ;**************************************************
  16.  
  17. (set rexx_size 0)
  18. (set clip_size 0)
  19.  
  20. ;**************************************************
  21. ;  See if this is actually an update, and if so be
  22. ;  sure they want program in same place
  23. ;**************************************************
  24.  
  25. (set is_update 0)
  26. (set pdraw_dest (getassign "PDraw" "a"))
  27. (copyfiles (source "PDraw3.0:lzx") (dest "ram:") (nogauge))
  28.  
  29. (if pdraw_dest
  30.    (if
  31.       (askbool
  32.          (prompt
  33.             "Your current copy of Professional Draw appears to be located "
  34.             "in the drawer named \"" pdraw_dest "\". Do you want to update "
  35.             "(over-write) this version?")
  36.          (help
  37.             "The installer has determined that you may already have a "
  38.             "copy of PDraw on your system. If this is wrong or if you "
  39.             "want Professional Draw 3.0 installed elsewhere answer NO; "
  40.             "otherwise, select YES.")
  41.          (default 1)
  42.       )
  43.       (set is_update -1)      ; if user wants in same place
  44.       (set pdraw_dest "")
  45.    )
  46. )
  47.  
  48.  
  49. ;**************************************************
  50. ;  Get new Home for program
  51. ;**************************************************
  52.  
  53. (if (= pdraw_dest "")
  54.    (set pdraw_dest
  55.       (askdir
  56.          (prompt
  57.             "Select the drawer where you would like Professional Draw 3.0 "
  58.             "installed. If you need a new drawer click on the "
  59.             "\"Make New Drawer...\" button and follow the directions."
  60.         "Please click on help for more information.")
  61.          (help
  62.             "The Program \"PDraw\" and the files \"PANTONE_data.bin\" "
  63.             "will be copied to this drawer. This is also the default "
  64.             "home for the \"PDrawFonts\" sub-directory and the auxilliary "
  65.         "utility programs. CGFonts will also be created here if it "
  66.         "does not currently exist.\n\n"
  67.         "Please note that this installation procedure differs from "
  68.         "previous procedures in that it will NOT automatically generate "
  69.         "a \"Pdraw\" drawer for you.")
  70.          (default @default-dest)
  71.       )
  72.    )
  73. )
  74.  
  75. ;**************************************************
  76. ;  Open first installation disk
  77. ;**************************************************
  78.  
  79. (askdisk
  80.    (prompt
  81.       "Please insert the disk labeled \"Disk_1\".")
  82.    (help
  83.       "Professional Draw ,all associated data files and auxilliary "
  84.       "programmes will be dearchived from this disk into your system.")
  85.    (dest "PDraw3.0")
  86. )
  87.  
  88. ;**************************************************
  89. ; at this point we have a valid destination, so we tell installer where
  90. ; the application will end up so the exit page will be correct -- also,
  91. ; the installation log file (if any) will be copied to the destination
  92. ;**************************************************
  93.  
  94. (set @default-dest pdraw_dest)
  95.  
  96. ; (set pdraw_size 507776+7786+13146) ; pdraw+PANTONE+cg_update
  97. ; (if (= (exists (tackon pdraw_dest "pdraw")) 1)
  98. ;    (set pdraw_size pdraw_size - (getsize (tackon pdraw_dest "pdraw")))
  99. ; )
  100. ; (set cg_size 75156) ; PDFontEngine3.0
  101. ; (set font_size 18881) ; pdpsprlg
  102. ; (set lib_size 40352)
  103.  
  104. (set cg_dest (getassign "CGFonts" "a"))
  105. (if (= cg_dest "") 
  106.    (
  107.       (set cg_dest (tackon pdraw_dest "CGFonts"))
  108.       (startup
  109.          "PDraw"
  110.          (prompt
  111.             "I am going to add a new assign for \"CGFonts:\" "
  112.             "to your startup sequence file.")
  113.          (help
  114.             "Professional Draw needs this assign for CG-type "
  115.             "fonts to work properly.")
  116.          (command "Assign CGFonts: \"" cg_dest "\"\n"))
  117.    )
  118. )
  119.  
  120. (set font_dest (getassign "PDrawFonts"))
  121. (if (= font_dest "") (set font_dest (tackon pdraw_dest "PDrawFonts")))
  122. (set data_dest (tackon font_dest "Data"))
  123.  
  124. (makedir pdraw_dest (infos))
  125. (if (<> (exists cg_dest) 2) (makedir cg_dest))
  126. (if (<> (exists font_dest) 2) (makedir font_dest))
  127. (if (<> (exists data_dest) 2) (makedir data_dest))
  128.  
  129. (makeassign "CGFonts" cg_dest)
  130.  
  131. (textfile
  132.    (dest "ram:install_script")
  133.    (append "cd " pdraw_dest "\n")
  134.    (append "ram:lzx -m x PDraw3.0:pdraw_prg.lzh * \n")
  135.    (append "cd " cg_dest "\n")
  136.    (append "ram:lzx -m x PDraw3.0:pdraw_CG.lzh * \n")
  137.    (append "cd " data_dest "\n")
  138.    (append "ram:lzx -m x PDraw3.0:pdraw_dat.lzh * \n")
  139.    (append "cd libs: \n")
  140.    (append "ram:lzx -m x PDraw3.0:pdraw_glb.lzh * \n")
  141. )
  142.  
  143. ;**************************************************
  144. ;  Copy Genies
  145. ;**************************************************
  146.  
  147. (set rexx_dest (getassign "Rexx" "a"))
  148. (if (= rexx_dest "")
  149.    (if (askbool
  150.       (prompt
  151.          "Couldn't find \"Rexx:\" Should I install Genies anyhow?")
  152.       (help
  153.          "I have made the assumption that ARexx is NOT currently"
  154.          "installed on your system. If you are planning to install"
  155.          "ARexx in the future and you want the functionallity of"
  156.          "Professional Draw Genies then answer YES otherwise"
  157.          "answer NO.")
  158.       (default 1)
  159.        )
  160.       (set rexx_dest
  161.          (askdir
  162.             (prompt "Where do you want the Genies installed?")
  163.             (help @askdir-help)
  164.             (default "S:")
  165.          )
  166.       )
  167.       (set rexx_dest "")
  168.    )
  169. )
  170.  
  171. (if (<> rexx_dest "")
  172.    (
  173. ;       (set lib_size lib_size+19468)
  174. ;       (set rexx_size 100000)
  175.       (if (<> (exists rexx_dest) 2) (makedir rexx_dest))
  176.       (textfile
  177.          (dest "ram:install_script")
  178.          (include "ram:install_script")
  179.          (append "cd " rexx_dest "\n")
  180.          (append "ram:lzx -m x PDraw3.0:pdraw_rex.lzh * \n")
  181.          (append "cd libs:\n")
  182.          (append "ram:lzx -m x PDraw3.0:pdraw_xlb.lzh * \n")
  183.       )
  184.    )
  185. )
  186.  
  187. ;**************************************************
  188. ;  Copy PDraw Fonts
  189. ;**************************************************
  190.  
  191. (if (<> (exists (tackon font_dest "Times.pdfont")) 1)
  192.   (
  193. ;    (set font_size 75910 + font_size)
  194.    (textfile
  195.       (dest "ram:install_script")
  196.       (include "ram:install_script")
  197.       (append "cd " font_dest "\n")
  198.       (append "ram:lzx -m x PDraw3.0:pdraw_fnt.lzh Times.pdfont \n")
  199.    )
  200.   )
  201. )
  202.  
  203. (if (<> (exists (tackon font_dest "Triumvirate.pdfont")) 1)
  204.   (
  205. ;    (set font_size 63304 + font_size)
  206.    (textfile
  207.       (dest "ram:install_script")
  208.       (include "ram:install_script")
  209.       (append "cd " font_dest "\n")
  210.       (append "ram:lzx -m x PDraw3.0:pdraw_fnt.lzh Triumvirate.pdfont\n")
  211.    )
  212.   )
  213. )
  214.  
  215. ;**************************************************
  216. ;  Copy The Artical Editor
  217. ;**************************************************
  218.  
  219. ; (set ae_dest 0)
  220. ; (if rexx_dest
  221. ;    (set ae_dest
  222. ;       (askchoice
  223. ;          (prompt
  224. ;      "Should I install Artical Editor?")
  225. ;   (help
  226. ;      "If you don't have PPage or you have an old version "
  227. ;      "of Artical Editor then answer Install, if you already have"
  228. ;      "is answer Got it, otherwise answer Cancel.")
  229. ;   (choices "Cancel" "Got it" "Install")
  230. ;   (default 2)
  231. ; )
  232. ; )
  233. ; )
  234. ; (if (= ae_dest 2)
  235. ;    (
  236. ;       (set ae_dest
  237. ;          (askdir
  238. ;             (prompt "Where do you want Artical Editor installed?")
  239. ;             (help @askdir-help)
  240. ;             (default pdraw_dest)
  241. ;          )
  242. ;       )
  243. ;       (if (<> (exists ae_dest) 2) (makedir ae_dest))
  244. ;       (textfile
  245. ;          (dest "ram:install_script")
  246. ;          (include "ram:install_script")
  247. ;          (append "cd " ae_dest "\n")
  248. ;          (append "ram:lzx -m x PDraw3.0:pdraw_ae.lzh * \n")
  249. ;       )
  250. ;    )
  251. ;    (if (= ae_dest 1)
  252. ;       (set ae_dest
  253. ;          (pathonly
  254. ;             (askfile
  255. ;              (prompt "Where is Artical Editor?"
  256. ;                 "Please select the Artical Editor Program to "
  257. ;            "run when editting GENIES.")
  258. ;         (help @askdir-help)
  259. ;         (default pdraw_dest)
  260. ;      )
  261. ;   )
  262. ; )
  263. ;       (set ae_dest "")
  264. ;    )
  265. ; )
  266.  
  267. ;**************************************************
  268. ;  Copy The Support programs
  269. ;**************************************************
  270.  
  271. (set trace_opts
  272.    (askoptions
  273.       (prompt
  274.          "Which of the following auxilliary programs and data do "
  275.          "you want me to install?")
  276.       (choices "Trace" "FontManager" "ClipMap" "Structured Clip Art")
  277.       (help
  278.          "TRACE: used to generate clips from IFF bitmaped images. "
  279.          "FONTMAN: converts Adobe type 1 fonts to CG format. "
  280.          "CLIPMAP: generates IFF bitmaped images from clips. ")
  281.    )
  282. )
  283.  
  284. (if (<> trace_opts 0)
  285.    (
  286.       (set aux (cat "cd " pdraw_dest "\n"))
  287.       (if (AND trace_opts 1)
  288.          (
  289. ;             (set pdraw_size pdraw_size+53006)
  290.             (set aux (cat aux "ram:lzx -m x PDraw3.0:pdraw_tce.lzh * \n"))
  291.      )
  292.       )
  293.       (if (AND trace_opts 2)
  294.          (
  295. ;             (set pdraw_size pdraw_size+195800)
  296.             (makedir (tackon pdraw_dest "fntman_modules") (infos))
  297.             (set aux (cat aux "ram:lzx -mr x PDraw3.0:pdraw_fmn.lzh * \n"))
  298.             (set aux (cat aux "cd " (tackon pdraw_dest "fntman_modules \n")))
  299.             (set aux (cat aux "ram:lzx -mr x PDraw3.0:pdraw_fmm.lzh * \n"))
  300.          )
  301.       )
  302.       (textfile
  303.          (dest "ram:install_script")
  304.          (include "ram:install_script")
  305.          (append aux)
  306.       )
  307.       (if (AND trace_opts 12)
  308.          (set clip_dest
  309.             (askdir
  310.                (prompt
  311.                   "Select the drawer where you would like the Clip art "
  312.                   "installed. If you need a new drawer click on the "
  313.                   "\"Make New Drawer...\" button and follow the directions.")
  314.                (help
  315.                   "Clips and the ClipMap utility will be copied here.")
  316.                (default (tackon pdraw_dest "Clips"))
  317.             )
  318.          )
  319.       )
  320.    )
  321. )
  322.  
  323. ;**************************************************
  324. ;   Do the install from the first disk
  325. ;**************************************************
  326.  
  327. (working "Please wait while installing files.")
  328.  
  329. (execute "ram:install_script")
  330. (delete "ram:install_script")
  331. (delete "ram:lzx")
  332.  
  333. ;**************************************************
  334. ;  Open second installation disk
  335. ;**************************************************
  336.  
  337. (if (AND trace_opts 12)
  338.    (
  339.       (askdisk
  340.          (prompt
  341.             "Please insert the disk labeled \"Disk_2\".")
  342.          (help
  343.             "Clips and the ClipMap utility will be copied from this disk "
  344.             "into your system.")
  345.          (dest "Clips3.0")
  346.       )
  347.       (working "Please wait while installing files.")
  348.       (makedir clip_dest (infos))
  349.       (if (AND trace_opts 8)
  350.          (copyfiles (source "Clips3.0:") (dest clip_dest) (all) (nogauge))
  351.          (if (AND trace_opts 4)
  352.             (copyfiles (source "Clips3.0:ClipMap")(dest clip_dest)(nogauge))
  353.          )
  354.       )
  355.    )
  356. )
  357.  
  358. ;**************************************************
  359. ;   modify .ini file
  360. ;**************************************************
  361.  
  362. (if (= ae_dest "") (set ae_dest "Ram:"))
  363. (if (= rexx_dest "") (set rexx_dest "s:"))
  364.  
  365. (textfile
  366.    (dest "s:PDraw.INI")
  367.    (append "FE  "cg_dest"\n")
  368.    (append "GE  "rexx_dest"\n")
  369.    (append "PMS "pdraw_dest"\n")
  370.    (append "FNT "font_dest"\n")
  371.    (append "PR  "data_dest"\n")
  372.    (append "PD  "pdraw_dest"\n")
  373. )
  374.  
  375. (execute (tackon pdraw_dest "CG_Update"))
  376.  
  377. (exit)
  378.